<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<script type="text/javascript">
	$(function() {
		var $grid = $('#grid_duty');
		var $title = '职责';
		var $baseUrl = 'sys/duty';

		$grid.treegrid({
			title : $title + '列表',
			url : $baseUrl + '/treeGrid?sort=sort,asc',
			dialog : {
				url : $baseUrl,
				name : $title,
				create : {
					width : 400,
					height : 350
				},
				update : {
					width : 400,
					height : 350
				}
			},
			columns : [ [ $.fields.treeField, $.fields.codePath, $.fields.description, $.fields.type, $.fields.sort, $.fields.createTime, $.fields.lastModifyTime, $.fields.status ] ],
			toolbar : [ $.crudgrid.buttons.createByParent, $.crudgrid.buttons.update, $.crudgrid.buttons.remove, '-', $.crudgrid.buttons.refresh ],
			filter : {
				prompt : '名称或代码',
				rules : [ {
					field : 'codePath',
					op : 'contains'
				}, {
					field : 'name',
					op : 'pinyinContains'
				} ]
			}
		}).treegrid('filter.init');
	});
</script>
<table id="grid_duty"></table>

